package spitfire.ksim.algorithm;

import java.util.List;

public class ContentSearchAlgorithm {
	public RankList search(List<Long> timeStampList,
			List<Double> dataList, List<FuzzyEntry> entryList) {
		RankList ranklist = new RankList();
		// search among all fuzzy entries
		for (FuzzyEntry entry : entryList) {
			double sc = SimilarityAlgorithm.calculateScore(dataList, entry.getRule());
			System.out.println("Score to " + entry.getNodeId() + ":" +
					entry.getSensorType() + " | " + entry.getSd() + ": " + sc);
			ranklist.add(entry.getNodeId(), entry.getSensorType(), entry.getSd(), sc);
		}
		return ranklist;
	}
}
